
export const jobColumns = [
    {
        type: 'selection',
        width: 60,
        align: 'center'
    },
    {
        title: 'JobId',
        key: 'jobId',
        align: 'center'
    },
    {
        title: 'Bean名称',
        key: 'beanName',
        align: 'center'
    },
    {
        title: '方法名',
        align: 'center',
        key: 'methodName'
    },
    {
        title: '参数',
        align: 'center',
        key: 'params'
    },
    {
        title: 'cron表达式',
        align: 'center',
        key: 'cron'
    },
    {
        title: '状态',
        align: 'center',
        render: (h, params) => {
            const row = params.row;
            if (row.status === 0) {
                return h('Tag', {
                    props: {
                        // type: 'border',
                        color: 'green'
                    }
                }, '正常');
            } else if (row.status === 1) {
                return h('Tag', {
                    props: {
                        // type: 'border',
                        color: 'red'
                    }
                }, '暂停');
            }
        }
    },
    {
        title: '备注',
        align: 'center',
        key: 'remark'
    },
    {
        title: '添加时间',
        align: 'center',
        key: 'created'
    },
    {
        title: '操作',
        align: 'center',
        key: 'handle',
        handle: ['edit', 'run', 'stop', 'resume', 'delete']
    }
];

const jobData = {
    jonColumns: jobColumns
};

export default jobData;
